#!/usr/bin/env python3.3

#
#  Filename: e63.py
#  Author  : lukas singer
#
#  Comment : Created by createSolution.sh
#

#import euler
#from euler import *

def pe63():
  limit=25
  cnt=0
  for i in range(1,limit):
    for j in range(1,limit):
      n=len(str(int(i**j)))
      if n<j:
        continue
      elif n>j:
        break
      else:
        cnt+=1
  print(cnt)

if __name__=="__main__":
  pe63()

